Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile error with single explicit assert in switch expression branch (#1845) #2033

Merged
merged 3 commits into from
Dec 26, 2024

Conversation

Vampire
Copy link
Member

@Vampire Vampire commented Oct 29, 2024

Fixes #1845

Copy link

codecov bot commented Oct 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 81.81%. Comparing base (2c7db77) to head (ea8a542).
Report is 176 commits behind head on master.

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #2033      +/-   ##
============================================
+ Coverage     80.44%   81.81%   +1.36%     
- Complexity     4337     4617     +280     
============================================
  Files           441      448       +7     
  Lines         13534    14468     +934     
  Branches       1707     1831     +124     
============================================
+ Hits          10888    11837     +949     
+ Misses         2008     1954      -54     
- Partials        638      677      +39     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@Vampire Vampire force-pushed the issue-1845 branch 8 times, most recently from f07a139 to 80f423c Compare November 5, 2024 13:43
@@ -13,4 +13,14 @@ class ConditionG4Spec extends Specification {
(0..<5) == [0, 1, 2, 3, 4]
(0<..<5) == [1, 2, 3, 4]
}

@Issue("https://github.com/spockframework/spock/issues/1845")
def "explicit assert in switch expression"() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about adding examples for the other assertions switch variants?

@leonard84 leonard84 enabled auto-merge (squash) December 26, 2024 15:54
@leonard84 leonard84 added this to the 2.4-M5 milestone Dec 26, 2024
@leonard84 leonard84 merged commit 01f3c4e into spockframework:master Dec 26, 2024
25 checks passed
@Vampire Vampire deleted the issue-1845 branch December 26, 2024 17:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Assertions in Switch Expressions lead to compiler error
3 participants